import request from '@/utils/request'

/**
 * 计算价格
 * @param {Object} params - 计算参数 {repairType, modelId, mileage}
 */
export function calculatePrice(params) {
  return request({
    url: '/api/repairPrice/calculate',
    method: 'get',
    params: params
  })
}

/**
 * 计算司机价格
 * @param {Object} params - 计算参数 {serviceId, repairType, modelId, mileage}
 */
export function calculateDriverPrice(params) {
  return request({
    url: '/api/repairPrice/calculateDriverPrice',
    method: 'get',
    params: params
  })
}

/**
 * 获取小修类型列表
 */
export function getRepairTypes() {
  return request({
    url: '/api/repairPrice/repairTypes',
    method: 'get'
  })
}

/**
 * 批量计算价格
 * @param {Object} data - 批量计算数据 {repairType, modelId, mileages[]}
 */
export function batchCalculatePrice(data) {
  return request({
    url: '/api/repairPrice/batchCalculate',
    method: 'post',
    data: data
  })
}
